Repository navigation
Certify G scaling of the helicity masks on Python 3.14 - #531
Open
oliviermattelaer wants to merge 1 commit into
Open
oliviermattelaer wants to merge 1 commit into
oliviermattelaer wants to merge 1 commit into
Conversation
helicity_coupling_degrees recognised numeric literals with ast.Num, which Python 3.14 removed. The AttributeError was caught as an unsupported expression, so every coupling came out of unknown degree and no NLO output certified homogeneous_G: with a dynamical scale each Born and real-emission call relearned its helicity mask at every change of alpha_s. Test numeric literals as ast.Constant instead. The existing coupling-degree test already failed on Python 3.14; the new test hides the removed aliases so that CI on older Pythons catches a reintroduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
How CI reacts to this PR
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Python 3.14, NLO outputs never certify the G scaling of their helicity masks:
Source/BornSupport/helicity_signature.jsongets"mode": "exact_compact_state"instead of"homogeneous_G". As a result, with a dynamical scale every Born and real-emission call relearns its helicity mask, summing all helicities, each time alpha_s changes.The cause is
born_support.helicity_coupling_degrees, which recognised numeric literals withast.Num. Python 3.14 removed that alias. The resultingAttributeErroris caught as an "unsupported expression", so every coupling comes out with an unknown degree. Python 3.13 and older are not affected. That is why main looked fine on the cluster (Python 3.13) but not on a Python 3.14 laptop.Fix
Numeric literals are now tested as
ast.Constantwith an int, float or complex value. This is the same change as the corresponding hunk of 3505311 in #512, split out so that main gets it now.Tests
test_sm_and_heft_coupling_degreesalready failed on main under Python 3.14 (9 subtest failures). CI runs an older Python, so it did not see this.test_coupling_degrees_without_removed_ast_aliases: it reruns the same cases withast.Num,ast.Str,ast.Bytes,ast.NameConstantandast.Ellipsishidden, so it catches a reintroduction on any Python version.🤖 Generated with Claude Code